/****************************************************************************\
 * @file     BR_Paths.c
 * @author   傅帅
 * @date     2019/12/30
 * @brief    存路径本体
 ******************************************************************************
 * @attent   路径数组存成const,编译器会将其存至Flash中的RO只读区,可显著节省RAM
 ****************************************************************************/
#include "BR_Common.h"
#include "arm_math.h"

/*         vx,          vy,           x,           y,    theta */
const float PATH1[][5] = {
{      0.000f,      0.000f,   -350.000f,    350.000f,   0.000f},
{   -470.173f,    423.010f,   -424.000f,    417.000f,   0.000f},
{   -664.925f,    598.227f,   -498.000f,    484.000f,   0.000f},
{   -814.363f,    732.675f,   -573.000f,    551.000f,   0.000f},
{   -940.345f,    846.021f,   -647.000f,    618.000f,   0.000f},
{  -1051.338f,    945.880f,   -721.000f,    685.000f,   0.000f},
{  -1151.683f,   1036.159f,   -796.000f,    752.000f,   0.000f},
{  -1243.960f,   1119.180f,   -870.000f,    819.000f,   0.000f},
{  -1329.849f,   1196.454f,   -944.000f,    886.000f,   0.000f},
{  -1417.786f,   1252.535f,  -1019.000f,    951.000f,   0.004f},
{  -1521.102f,   1256.937f,  -1095.000f,   1016.000f,   0.018f},
{  -1620.359f,   1251.330f,  -1173.000f,   1079.000f,   0.032f},
{  -1715.247f,   1236.462f,  -1254.000f,   1138.000f,   0.045f},
{  -1805.435f,   1213.008f,  -1336.000f,   1196.000f,   0.059f},
{  -1890.584f,   1181.598f,  -1420.000f,   1250.000f,   0.073f},
{  -1970.356f,   1142.830f,  -1505.000f,   1301.000f,   0.087f},
{  -2044.418f,   1097.286f,  -1593.000f,   1350.000f,   0.101f},
{  -2112.448f,   1045.538f,  -1681.000f,   1396.000f,   0.115f},
{  -2174.139f,    988.154f,  -1772.000f,   1439.000f,   0.128f},
{  -2229.203f,    925.701f,  -1864.000f,   1479.000f,   0.142f},
{  -2277.372f,    858.751f,  -1956.000f,   1515.000f,   0.156f},
{  -2313.274f,    786.137f,  -2051.000f,   1549.000f,   0.170f},
{  -2337.952f,    709.385f,  -2146.000f,   1580.000f,   0.184f},
{  -2360.085f,    631.860f,  -2242.000f,   1607.000f,   0.198f},
{  -2379.647f,    553.647f,  -2339.000f,   1631.000f,   0.211f},
{  -2396.619f,    474.832f,  -2437.000f,   1652.000f,   0.225f},
{  -2410.981f,    395.499f,  -2535.000f,   1670.000f,   0.239f},
{  -2422.717f,    315.736f,  -2634.000f,   1685.000f,   0.253f},
{  -2431.815f,    235.629f,  -2733.000f,   1696.000f,   0.267f},
{  -2438.266f,    155.265f,  -2833.000f,   1704.000f,   0.280f},
{  -2442.061f,     74.732f,  -2933.000f,   1709.000f,   0.294f},
{  -2443.197f,     -5.882f,  -3033.000f,   1710.000f,   0.308f},
{  -2441.673f,    -86.489f,  -3133.000f,   1708.000f,   0.322f},
{  -2437.490f,   -167.003f,  -3233.000f,   1703.000f,   0.336f},
{  -2425.629f,   -246.823f,  -3332.000f,   1694.000f,   0.350f},
{  -2397.580f,   -324.207f,  -3432.000f,   1683.000f,   0.363f},
{  -2361.708f,   -399.103f,  -3531.000f,   1668.000f,   0.377f},
{  -2318.128f,   -470.891f,  -3629.000f,   1649.000f,   0.391f},
{  -2266.971f,   -538.951f,  -3727.000f,   1628.000f,   0.405f},
{  -2208.390f,   -602.657f,  -3823.000f,   1603.000f,   0.419f},
{  -2142.552f,   -661.378f,  -3920.000f,   1575.000f,   0.433f},
{  -2069.633f,   -714.472f,  -4015.000f,   1544.000f,   0.446f},
{  -1989.812f,   -761.280f,  -4109.000f,   1510.000f,   0.460f},
{  -1903.266f,   -801.117f,  -4201.000f,   1472.000f,   0.474f},
{  -1810.153f,   -833.260f,  -4293.000f,   1432.000f,   0.488f},
{  -1710.600f,   -856.925f,  -4383.000f,   1389.000f,   0.502f},
{  -1604.676f,   -871.244f,  -4472.000f,   1343.000f,   0.516f},
{  -1492.358f,   -875.215f,  -4559.000f,   1293.000f,   0.529f},
{  -1373.469f,   -867.629f,  -4644.000f,   1241.000f,   0.543f},
{  -1247.582f,   -846.953f,  -4728.000f,   1187.000f,   0.557f},
{  -1113.830f,   -811.100f,  -4809.000f,   1129.000f,   0.571f},
{   -970.532f,   -756.985f,  -4889.000f,   1069.000f,   0.585f},
{      0.000f,      0.000f,  -5176.000f,    815.000f,   0.638f},
};


/*                    pPath,                       NormalP     NormalD     ThetaP      ThetaD    ArriveDis    ArriveAng */
BR_Path_t PathStru1 = {( float (*)[5] )PATH1,      0.0018f,     0.003f,      12.0f,       0.0f,     30.0f,      PI / 360};
